//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.core;

import com.itheima.pinda.authority.entity.core.Org;
import com.itheima.pinda.model.ITreeNode;
import io.swagger.annotations.ApiModel;
import java.util.List;

@ApiModel(
        value = "OrgTreeDTO",
        description = "组织树"
)
public class OrgTreeDTO extends Org implements ITreeNode<OrgTreeDTO, Long> {
    private List<OrgTreeDTO> children;
    private String label;

    public Long getId() {
        return (Long)super.getId();
    }

    public Long getCreateUser() {
        return (Long)super.getCreateUser();
    }

    public Long getUpdateUser() {
        return (Long)super.getUpdateUser();
    }

    public List<OrgTreeDTO> getChildren() {
        return this.children;
    }

    public void setChildren(List<OrgTreeDTO> children) {
        this.children = children;
    }

    public String getLabel() {
        return this.getName();
    }

    public String toString() {
        return "OrgTreeDTO(super=" + super.toString() + ", children=" + this.getChildren() + ", label=" + this.getLabel() + ")";
    }

    public OrgTreeDTO() {
    }

    public void setLabel(final String label) {
        this.label = label;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof OrgTreeDTO)) {
            return false;
        } else {
            OrgTreeDTO other = (OrgTreeDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$children = this.getChildren();
                Object other$children = other.getChildren();
                if (this$children == null) {
                    if (other$children != null) {
                        return false;
                    }
                } else if (!this$children.equals(other$children)) {
                    return false;
                }

                Object this$label = this.getLabel();
                Object other$label = other.getLabel();
                if (this$label == null) {
                    if (other$label != null) {
                        return false;
                    }
                } else if (!this$label.equals(other$label)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof OrgTreeDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $children = this.getChildren();
        result = result * 59 + ($children == null ? 43 : $children.hashCode());
        Object $label = this.getLabel();
        result = result * 59 + ($label == null ? 43 : $label.hashCode());
        return result;
    }
}
